package org_enum

// 组织-组织类型
type orgOrganizationCategory int

var OrgOrganizationCategory orgOrganizationCategory

// 政府机构
func (c *orgOrganizationCategory) GovernmentOrganization() int {
	return 1
}

// 运输企业
func (c *orgOrganizationCategory) TransportEnterprise() int {
	return 2
}

// 个体
func (c *orgOrganizationCategory) SelfEmployed() int {
	return 3
}

// 供应商
func (c *orgOrganizationCategory) Supplier() int {
	return 4
}

// 代理商
func (c *orgOrganizationCategory) Agent() int {
	return 5
}

// 卫星运营商
func (c *orgOrganizationCategory) SateliteOperator() int {
	return 6
}

// 驾校
func (c *orgOrganizationCategory) DriverSchool() int {
	return 7
}

// 建筑工地
func (c *orgOrganizationCategory) ConstructionSite() int {
	return 8
}

func (c *orgOrganizationCategory) ToText(value int) string {
	switch value {

	case 1:
		return "GovernmentOrganization"

	case 2:
		return "TransportEnterprise"

	case 3:
		return "SelfEmployed"

	case 4:
		return "Supplier"

	case 5:
		return "Agent"

	case 6:
		return "SateliteOperator"

	case 7:
		return "DriverSchool"

	case 8:
		return "ConstructionSite"

	}
	return ""
}

func (c *orgOrganizationCategory) ToValue(text string) int {
	switch text {

	case "GovernmentOrganization":
		return 1

	case "TransportEnterprise":
		return 2

	case "SelfEmployed":
		return 3

	case "Supplier":
		return 4

	case "Agent":
		return 5

	case "SateliteOperator":
		return 6

	case "DriverSchool":
		return 7

	case "ConstructionSite":
		return 8

	}
	return 0
}
